{% extends 'base.html' %}


{% block pub_active %}
    active
{% endblock %}

{% block content %}

    <h3 class="sub-header">出版社列表</h3>
    <div class="table-responsive">

                <a class="btn btn-primary btn-sm" href="/publisher_add/"> 添加 </a>

                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>ID</th>
                        <th>出版社名称</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>

                    {% for publisher in all_publishers %}

                        <tr>
                            <td>{{ forloop.counter }}</td>
                            <td>{{ publisher.pk }}</td>
                            <td>{{ publisher }}</td>
                            <td>
                                <a class="btn btn-danger btn-sm" href="/publisher_del/?pk={{ publisher.pk }}">删除</a>
                                <a class="btn btn-warning btn-sm" href="/publisher_edit/?pk={{ publisher.pk }}">编辑</a>
                            </td>
                        </tr>

                    {% endfor %}

                    </tbody>
                </table>
            </div>

{% endblock %}